home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000645_sojka@daeron.ics.muni.cz_Mon Jun 13 17:49:34 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  8KB

  1. Received: from aragorn.ics.muni.cz by cs.umb.edu with SMTP id AA02670
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Mon, 13 Jun 1994 09:50:47 -0400
  3. Received: from daeron (daeron.ics.muni.cz) by aragorn.ics.muni.cz with SMTP id AA01623
  4.   (5.67a8/IDA-1.4.4); Mon, 13 Jun 1994 15:49:09 +0200
  5. Received: by daeron id AA22296
  6.   (5.67b8/IDA-1.4.4); Mon, 13 Jun 1994 15:49:37 +0200
  7. From: Petr Sojka <sojka@daeron.ics.muni.cz>
  8. Message-Id: <199406131349.AA22296@daeron>
  9. Subject: Bugs in kpathsea & xdvik 1.8 with patches included
  10. To: karl@cs.umb.edu (Karl Berry), tex-k@cs.umb.edu
  11. Date: Mon, 13 Jun 1994 15:49:34 +0200 (MET DST)
  12. Organization: Masaryk University, Brno, The Czech Republic
  13. Postal-Address: Institute of Computer Science, Buresova 20, 60200 Brno
  14. Telephone: +42-5-41321237 ext. 283, Fax: +42-5-41212747 
  15. X-Mailer: ELM [version 2.4 PL23]
  16. Content-Type: text
  17. Content-Length: 7095      
  18.  
  19. Hi Karl & all,
  20.  
  21. we are installing web2c 6.1 on SunOs 5.3 (Solaris)
  22. (dvipsk 5.55a, xdvik 1.8, dviljk 1.1) with latest patches
  23. from ftp.cs.umb.edu). We've found several bugs in
  24. kpathsea library and xdvik (see patches below).
  25. (328-329DPI problem, environment variables substitution,
  26. // handling etc.)
  27.  
  28. We hope that these fixes will be incorporated in the new version
  29. of programs.
  30.  
  31. Regards
  32. Petr <sojka@muni.cz> , Zdenek <salvet@dcs.muni.cz>
  33.  
  34. --------------------
  35. This is patch for kpathsea 1.8.
  36. Included changes:
  37. in db.c - implemented // path construct for database seaches
  38. in pathsearch.c - fixed environment variables substitution
  39.                   if search is limited to db,search db irrespective to
  40.                     elt_in_db ( %%/packages/tex// when DBDIR=/packages/tex/lib )
  41. in tex-glyph.c and tex-make.c - adjust dpi when it doesn't exactly match 
  42.                                 desired magstep
  43.  
  44.  
  45. *** kpathsea_orig/db.c    Thu Mar 24 16:18:58 1994
  46. --- kpathsea/db.c    Mon Jun 13 11:35:56 1994
  47. ***************
  48. *** 78,85 ****
  49.        
  50.   static boolean
  51.   match P2C(const_string, filename,  const_string, path_elt)
  52. ! {
  53. !   return true; /* Punt for now.  */
  54.   }
  55.   
  56.   /* Don't bother implementing a search path for the database itself, or
  57. --- 78,98 ----
  58.        
  59.   static boolean
  60.   match P2C(const_string, filename,  const_string, path_elt)
  61. ! { 
  62. !   if (*path_elt++!=*filename++) return 0;
  63. !   while (*path_elt==*filename)
  64. !     if (*filename==0) return 0; else path_elt++,filename++;
  65. !   if (*path_elt==0)
  66. !     if (*(path_elt-1)=='/' || *filename=='/') return index(filename+1,'/')?0:1;
  67. !       else return 0;
  68. !   if (*path_elt=='/' && *(path_elt-1)=='/')
  69. !     { filename--;
  70. !       while (!match(filename,path_elt) && (filename=index(filename+1,'/')));
  71. !       if (filename==NULL) return 0;
  72. !       return 1;
  73. !     }
  74. !   return 0;
  75.   }
  76.   
  77.   /* Don't bother implementing a search path for the database itself, or
  78. *** kpathsea_orig/tex-glyph.c    Thu Mar 24 17:26:19 1994
  79. --- kpathsea/tex-glyph.c    Mon Jun  6 16:17:13 1994
  80. ***************
  81. *** 294,302 ****
  82.   
  83.         /* OK, maybe we can create it on the fly with MakeTeXPK.  */
  84.         if (!ret)
  85. !         {
  86.             source = kpse_source_maketex;
  87.             /* `try_resolution' leaves the envvar set randomly.  */
  88.             xputenv_int ("KPATHSEA_DPI", dpi);
  89.             ret = kpse_make_tex (format, font_name);
  90.           }
  91. --- 294,304 ----
  92.   
  93.         /* OK, maybe we can create it on the fly with MakeTeXPK.  */
  94.         if (!ret)
  95. !         { int bdpi;
  96.             source = kpse_source_maketex;
  97.             /* `try_resolution' leaves the envvar set randomly.  */
  98. +           if(bdpi=atoi(getenv("KPATHSEA_BDPI")))
  99. +                 dpi=kpse_set_maketex_mag(dpi,bdpi);
  100.             xputenv_int ("KPATHSEA_DPI", dpi);
  101.             ret = kpse_make_tex (format, font_name);
  102.           }
  103. *** kpathsea_orig/tex-make.c    Wed Feb  2 15:58:53 1994
  104. --- kpathsea/tex-make.c    Mon Jun  6 16:39:53 1994
  105. ***************
  106. *** 196,202 ****
  107.      absolute-value function that is all we need.  */
  108.   #define ABS(expr) ((expr) < 0 ? -(expr) : (expr))
  109.   
  110. ! void
  111.   kpse_set_maketex_mag P2C(int, dpi,  int, bdpi)
  112.   {
  113.     int m, n;
  114. --- 196,202 ----
  115.      absolute-value function that is all we need.  */
  116.   #define ABS(expr) ((expr) < 0 ? -(expr) : (expr))
  117.   
  118. ! int
  119.   kpse_set_maketex_mag P2C(int, dpi,  int, bdpi)
  120.   {
  121.     int m, n;
  122. ***************
  123. *** 263,268 ****
  124. --- 263,270 ----
  125.   #endif /* not DOS or OS2 */
  126.   
  127.     xputenv ("MAKETEX_MAG", q);
  128. +   xputenv_int("KPATHSEA_BDPI",bdpi);
  129. +   return (m==9999|| m==0)?dpi:n;
  130.   }
  131.   
  132.   /* I don't think it makes much difference whether we check if DPI2 can
  133. *** kpathsea_orig/pathsearch.c    Thu Mar 24 16:18:58 1994
  134. --- kpathsea/pathsearch.c    Mon Jun 13 15:05:55 1994
  135. ***************
  136. *** 166,172 ****
  137.           }
  138.         
  139.         /* Try the prebuilt db only if it's relevant to this path element. */
  140. !       try_db = elt_in_db (elt);
  141.         found = try_db ? kpse_db_search (name, elt, all) : NULL;
  142.         
  143.         /* Search the filesystem if (1) the path spec allows it, and either
  144. --- 166,173 ----
  145.           }
  146.         
  147.         /* Try the prebuilt db only if it's relevant to this path element. */
  148. !       /* elt_in_db is too limiting , override al least with %%  */
  149. !       try_db = (elt_in_db (elt)||forbid_fs_search);
  150.         found = try_db ? kpse_db_search (name, elt, all) : NULL;
  151.         
  152.         /* Search the filesystem if (1) the path spec allows it, and either
  153. ***************
  154. *** 218,224 ****
  155.      terminated with NULL.  */
  156.   
  157.   static string *
  158. ! search P4C(const_string, path,  const_string, original_name,
  159.              boolean, must_exist,  boolean, all)
  160.   {
  161.     str_list_type ret_list;
  162. --- 219,225 ----
  163.      terminated with NULL.  */
  164.   
  165.   static string *
  166. ! search P4C(const_string, orig_path,  const_string, original_name,
  167.              boolean, must_exist,  boolean, all)
  168.   {
  169.     str_list_type ret_list;
  170. ***************
  171. *** 225,231 ****
  172.   
  173.     /* Make a leading ~ count as an absolute filename, and expand $FOO's.  */
  174.     string name = kpse_expand (original_name);
  175. !   
  176.     /* If the first name is absolute or explicitly relative, no need to
  177.        consider PATH at all.  */
  178.     boolean absolute_p = kpse_absolute_p (name);
  179. --- 226,232 ----
  180.   
  181.     /* Make a leading ~ count as an absolute filename, and expand $FOO's.  */
  182.     string name = kpse_expand (original_name);
  183. !   string path = kpse_expand(orig_path);
  184.     /* If the first name is absolute or explicitly relative, no need to
  185.        consider PATH at all.  */
  186.     boolean absolute_p = kpse_absolute_p (name);
  187.  
  188. Patches for xdvik and dvipsk to solve 328/329dpi problem (uses kpathsea
  189. with above patches applied).
  190. Analogous patch should be applied to dviljk.
  191.  
  192. *** xdvik-1.8_orig/xdvik/dvi_init.c    Fri Mar 11 19:30:57 1994
  193. --- xdvik-1.8/xdvik/dvi_init.c    Mon Jun 13 15:32:55 1994
  194. ***************
  195. *** 172,180 ****
  196.       int    size_found;
  197.       int    magic;
  198.   
  199. !         if (use_maketexpk)
  200.             /* In case font_open winds up calling MakeTeXPK.  */
  201. !           kpse_set_maketex_mag (dpi, pixels_per_inch);
  202.   
  203.       fontp->flags |= FONT_LOADED;
  204.       fontp->file = font_open(fontp->fontname, &font_found,
  205. --- 172,180 ----
  206.       int    size_found;
  207.       int    magic;
  208.   
  209. !         /*if (use_maketexpk)
  210.             /* In case font_open winds up calling MakeTeXPK.  */
  211. !           fsize=kpse_set_maketex_mag (dpi, pixels_per_inch);
  212.   
  213.       fontp->flags |= FONT_LOADED;
  214.       fontp->file = font_open(fontp->fontname, &font_found,
  215. *** dvipsk-5.55a_orig/dvipsk/loadfont.c    Fri Apr  1 18:51:30 1994
  216. --- dvipsk-5.55a/dvipsk/loadfont.c    Tue Jun  7 10:55:43 1994
  217. ***************
  218. *** 135,142 ****
  219.      {
  220.        char *name = concat (d, n);
  221.   
  222.        xputenv ("MAKETEX_DPI", itoa (fd->dpi));
  223. -      kpse_set_maketex_mag (fd->dpi, DPI);
  224.   
  225.        /* Don't run MakeTeXPK if it's been globally disabled or
  226.           if the font is absolute_p.  */
  227. --- 135,142 ----
  228.      {
  229.        char *name = concat (d, n);
  230.   
  231. +      fd->dpi=kpse_set_maketex_mag (fd->dpi, DPI);
  232.        xputenv ("MAKETEX_DPI", itoa (fd->dpi));
  233.   
  234.        /* Don't run MakeTeXPK if it's been globally disabled or
  235.           if the font is absolute_p.  */